<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue</title>
    <style>
    </style>
</head>
<body>
<div id="app">
    <my-com1></my-com1>
</div>

<template id="tpl">
    <div>
        <h1>hello world</h1>
        <h4>22</h4>
    </div>
</template>

<script src="https://unpkg.com/vue/dist/vue.js"></script>

<script>
    let myCom2 = {
        template: "<h1>hi</h1>"
    };

    var vm = new Vue({
        el: '#app',
        data: {
        },
        methods: {
        },
        // 私有组件定义
        components: {
            myCom1: {
                template: "#tpl"
            },
            myCom2 //该种形式也可以，证明名字标签名字也是myCom2，换名字则可以写成 xxx: myCom2
        }
    });
</script>
</body>
</html>
